package com.go.where.family.service.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.go.where.family.dao.StarPhotoDao;
import com.go.where.family.pojo.StarPhotoInfo;
import com.go.where.family.service.StarPhotoService;

@Service("starPhotoService")
public class StarPhotoServiceImpl implements StarPhotoService {

	@Resource(name = "starPhotoDao")
	private StarPhotoDao starPhotoDao;

	@Override
	public List<StarPhotoInfo> queryList(Map<String, Object> map) {
		return starPhotoDao.queryT(map);
	}

	@Override
	public StarPhotoInfo queryStarPhotoDetail(String id) {
		StarPhotoInfo star = new StarPhotoInfo();
		star.setId(id);
		return starPhotoDao.queryByPrimaryKey(star);
	}

	@Override
	public int update(StarPhotoInfo starInfo) {
		starInfo.setUpdateTime(new Date());
		return starPhotoDao.update(starInfo);
	}

	@Override
	public long queryTotalSupport(Map<String, Object> map) {
		return starPhotoDao.queryTotalSupport(map);
	}

}
